/*
 * @Author: 徐建辰
 * @Date: 2021-11-04 16:45:16
 * @LastEditTime: 2021-11-04 17:21:34
 * @LastEditors: Please set LastEditors
 * @Description: 日历-周组件
 */
import React from 'react'
import PropTypes from 'prop-types'
import Day from './Day'
import './datepicker.css'

function Week(props) {
  const {days, onSelect} = props
  return (
    <tr className="date-table-days">
      {days.map((day, index) => <Day key={index} day={day} onSelect={onSelect} />)}
    </tr>
  )
}

Week.propTypes = {
  days: PropTypes.array.isRequired,
  onSelect: PropTypes.func.isRequired
}

export default Week
